<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" >
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="/css/css/error.css">
    <link rel="stylesheet" href="css/fonts/font-awesome/css/font-awesome.min.css">

</head>
<body>
<div id="admin_main_bodys"  class="jzy_mg_right_15 cbtn">
<div class="jzy_desktop_panel jzy_mg_top_40" style="height: 550px;">
    <h2 class="fs_26 jzy_mg_bottom_40" style="font-weight: 400;line-height: 1;">我的信息</h2>
    <form th:action="@{/upduser1}" method="post" style="text-align: center" id="LAY-user-form">
        <table class="container" th:each="lists:${list}">
            <tr class="row">
                <td><input type="hidden" name="id" th:value="${lists.getId()}" ></td>
            </tr>
            <tr class="row" >
                <td class="col-md-3" >姓名:</td>
                <td class="col-md-4"><span th:text="${lists.getName()}"></span></td>
<!--                <td class="col-md-5"><input type="text" name="name" th:value="${lists.getName()}"/></td>-->
            </tr>
            <tr class="row" style="margin-top: 30px;">
                <td class="col-md-3">用户名:</td>
                <td class="col-md-4"><span th:text="${lists.getAccount()}"></span></td>
<!--                <td class="col-md-5"><input type="text" name="employeesid" th:value="${lists.employeesid}"/></td>-->
            </tr>
            <tr class="row" style="margin-top: 30px;">
                <td class="col-md-3">性别:</td>
                <td class="col-md-4" style="">
                    <input style="width: 50px" type="radio" name="sex" th:checked="${lists.sex =='男'}" value="男"/>男
                    <input style="width: 50px" type="radio" name="sex" th:checked="${lists.sex =='女'}" value="女"/> 女
<!--                    <input type="text" name="sex" th:value="${lists.sex}"/>-->
<!--                    <input type="radio" name="sex" checked="checked">男-->
<!--                    <input type="radio" name="sex">女-->
                </td>
            </tr>
            <tr class="row" style="margin-top: 30px;">
                <td class="col-md-3" style="padding-top: 15px;">手机号:</td>
                <td class="col-md-4">
                    <label for="LAY-user-login-password"></label>
                    <input type="text" name="phone" th:value="${lists.phone}" id="LAY-user-login-password" lay-verify="required"/>
                </td>
            </tr>
            <tr class="row" style="margin-top: 30px;">
                <td class="col-md-3" style="padding-top: 15px;">邮箱:</td>
                <td class="col-md-4">
                    <label for="LAY-user-login-email"></label>
                    <input type="text" name="email" th:value="${lists.email}" id="LAY-user-login-email" lay-verify="required"/></td>
            </tr>
            <tr class="row" style="margin-top: 30px;">
                <td class="col-md-3">部门:</td>
                <td class="col-md-4"><span th:text="${lists.getPoName()}"></span></td>
<!--                <td class="col-md-5"><input type="text" name="departmentid" th:value="${lists.departmentid}"/></td>-->
            </tr>
<!--            <tr class="row" style="margin-top: 4px;">-->
<!--                <td class="col-md-3" style="padding-top: 15px;">状态:</td>-->
<!--                <td class="col-md-5"><input type="text" name="state" th:value="${lists.state}"/></td>-->
<!--            </tr>-->
            <tr class="row" style="margin-top: 30px;">
                <td class="col-md-3">
                    <button type="submit" class="jzy_w_100 br_2 jzy_boy_5 rt jzy_text_center fs_14 cr_h_0" style="line-height: 35px;background-color: #67C23A;color: black" >保存</button>
                    &nbsp;&nbsp&nbsp;
                </td>
                <td class="col-md-2">
                    <button type="button" class="jzy_w_100 br_2 jzy_boy_5 rt jzy_text_center fs_14 cr_h_0" style="line-height: 35px;background-color: #67C23A;color: black"   onclick="myExit()">返回</button>
                </td>
            </tr>
        </table>
    </form>
</div>
</div>
<!--<div class="bdiv">-->
<!--    <p class="cbtn" id="sd">保存</p>-->
<!--    <p id="fbtn" class="cbtn">返回</p>-->
<!--</div>-->
<!--<script src="../js/jq"></script>-->


</body>
<script src="/css/js/jquery3.4.1.js"></script>
<script src="/css/js/jquery.validate.js"></script>
<script src="/css/layui/layui.js"></script>
<script>
    jQuery.validator.addMethod("phone", function (value, element) {
        var tel1 = /^((13[0-9])|(17[0-1,6-8])|(15[^4,\\D])|(18[0-9]))\d{8}$/;
        return tel1.test(value);
    }, "请输入正确的手机号");
    jQuery.validator.addMethod("email", function (value, element) {
        var tel2 = /^\w+@[a-z0-9]+\.[a-z]+$/i;
        return tel2.test(value);
    }, "请输入正确的邮箱");
    //表单验证
    $("#LAY-user-form").validate({
        rules: {
            phone: {
                required: true,
                phone: true,
                // rangelength: [11]
            },
            email: {
                required: true,
                email: true,
            },
        },
        messages: {
            phone: {
                required: "请输入您的手机号",
                // rangelength: "手机号必须是{0}位"
            },
            email: {
                required: "请输入您的邮箱",
                // rangelength: "手机号必须是{0}位"
            },
        }
    })
</script>
<script>

    function myExit () {
        admin_main_body.style.display="block";
        div2.style.display="none";

    };

</script>
</html>